# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=tz
pkgver=0.6.3
pkgrel=8
pkgdesc="interactive TUI program that displays time across a few time zones of your choosing"
url="https://github.com/oz/tz"
arch="all"
license="GPL-3.0-or-later"
makedepends="go"
depends="tzdata"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/oz/tz/archive/refs/tags/v$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -modcacherw"
export CGO_ENABLED=0
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v .
}

check() {
	go test ./...
}

package() {
	install -Dm755 "tz" "$pkgdir/usr/bin/tz"
}

sha512sums="
091ac36c2fe942647b26b1850b550e48f8399fbe4fc81a4679b86095b554072564810c553c84dbae2c9ffd6760dec25fcffab77677144c3cdd434ec2fa238d5e  tz-0.6.3.tar.gz
"
